Integrand size = 31, antiderivative size = 207 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=-\frac {3 d \left (2 c^2+2 c d+d^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{a (c-d)^{7/2} (c+d)^{5/2} f}+\frac {d (2 c+3 d) \tan (e+f x)}{2 a (c-d)^2 (c+d) f (c+d \sec (e+f x))^2}+\frac {\tan (e+f x)}{(c-d) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}+\frac {d (2 c+d) (c+4 d) \tan (e+f x)}{2 a (c-d)^3 (c+d)^2 f (c+d \sec (e+f x))} \]
[Out]
Time = 0.48 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {4072, 105, 156, 157, 12, 95, 211} \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=\frac {3 d \left (2 c^2+2 c d+d^2\right ) \tan (e+f x) \arctan \left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{f (c-d)^{7/2} (c+d)^{5/2} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}-\frac {d (4 c+d) \tan (e+f x)}{2 f \left (c^2-d^2\right )^2 (a \sec (e+f x)+a) (c+d \sec (e+f x))}-\frac {d \tan (e+f x)}{2 f \left (c^2-d^2\right ) (a \sec (e+f x)+a) (c+d \sec (e+f x))^2}+\frac {(2 c+d) (c+4 d) \tan (e+f x)}{2 f (c-d)^3 (c+d)^2 (a \sec (e+f x)+a)} \]
[In]
[Out]
Rule 12
Rule 95
Rule 105
Rule 156
Rule 157
Rule 211
Rule 4072
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (a+a x)^{3/2} (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d \tan (e+f x)}{2 \left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}-\frac {\tan (e+f x) \text {Subst}\left (\int \frac {a^2 (2 c+d)-2 a^2 d x}{\sqrt {a-a x} (a+a x)^{3/2} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{2 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d \tan (e+f x)}{2 \left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}-\frac {d (4 c+d) \tan (e+f x)}{2 \left (c^2-d^2\right )^2 f (a+a \sec (e+f x)) (c+d \sec (e+f x))}-\frac {\tan (e+f x) \text {Subst}\left (\int \frac {a^4 (c+d) (2 c+3 d)-a^4 d (4 c+d) x}{\sqrt {a-a x} (a+a x)^{3/2} (c+d x)} \, dx,x,\sec (e+f x)\right )}{2 a^2 \left (c^2-d^2\right )^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(2 c+d) (c+4 d) \tan (e+f x)}{2 (c-d)^3 (c+d)^2 f (a+a \sec (e+f x))}-\frac {d \tan (e+f x)}{2 \left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}-\frac {d (4 c+d) \tan (e+f x)}{2 \left (c^2-d^2\right )^2 f (a+a \sec (e+f x)) (c+d \sec (e+f x))}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {3 a^6 d \left (2 c^2+2 c d+d^2\right )}{\sqrt {a-a x} \sqrt {a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{2 a^5 (c-d) \left (c^2-d^2\right )^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(2 c+d) (c+4 d) \tan (e+f x)}{2 (c-d)^3 (c+d)^2 f (a+a \sec (e+f x))}-\frac {d \tan (e+f x)}{2 \left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}-\frac {d (4 c+d) \tan (e+f x)}{2 \left (c^2-d^2\right )^2 f (a+a \sec (e+f x)) (c+d \sec (e+f x))}+\frac {\left (3 a d \left (2 c^2+2 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{2 (c-d) \left (c^2-d^2\right )^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(2 c+d) (c+4 d) \tan (e+f x)}{2 (c-d)^3 (c+d)^2 f (a+a \sec (e+f x))}-\frac {d \tan (e+f x)}{2 \left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}-\frac {d (4 c+d) \tan (e+f x)}{2 \left (c^2-d^2\right )^2 f (a+a \sec (e+f x)) (c+d \sec (e+f x))}+\frac {\left (3 a d \left (2 c^2+2 c d+d^2\right ) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{a c-a d-(-a c-a d) x^2} \, dx,x,\frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {a-a \sec (e+f x)}}\right )}{(c-d) \left (c^2-d^2\right )^2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(2 c+d) (c+4 d) \tan (e+f x)}{2 (c-d)^3 (c+d)^2 f (a+a \sec (e+f x))}+\frac {3 d \left (2 c^2+2 c d+d^2\right ) \arctan \left (\frac {\sqrt {c+d} \sqrt {a+a \sec (e+f x)}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right ) \tan (e+f x)}{(c-d)^{7/2} (c+d)^{5/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {d \tan (e+f x)}{2 \left (c^2-d^2\right ) f (a+a \sec (e+f x)) (c+d \sec (e+f x))^2}-\frac {d (4 c+d) \tan (e+f x)}{2 \left (c^2-d^2\right )^2 f (a+a \sec (e+f x)) (c+d \sec (e+f x))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 7.45 (sec) , antiderivative size = 1422, normalized size of antiderivative = 6.87 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=\frac {\left (2 c^2+2 c d+d^2\right ) \cos ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) (d+c \cos (e+f x))^3 \sec ^4(e+f x) \left (-\frac {6 i d \arctan \left (\sec \left (\frac {f x}{2}\right ) \left (\frac {\cos (e)}{\sqrt {c^2-d^2} \sqrt {\cos (2 e)-i \sin (2 e)}}-\frac {i \sin (e)}{\sqrt {c^2-d^2} \sqrt {\cos (2 e)-i \sin (2 e)}}\right ) \left (-i d \sin \left (\frac {f x}{2}\right )+i c \sin \left (e+\frac {f x}{2}\right )\right )\right ) \cos (e)}{\sqrt {c^2-d^2} f \sqrt {\cos (2 e)-i \sin (2 e)}}-\frac {6 d \arctan \left (\sec \left (\frac {f x}{2}\right ) \left (\frac {\cos (e)}{\sqrt {c^2-d^2} \sqrt {\cos (2 e)-i \sin (2 e)}}-\frac {i \sin (e)}{\sqrt {c^2-d^2} \sqrt {\cos (2 e)-i \sin (2 e)}}\right ) \left (-i d \sin \left (\frac {f x}{2}\right )+i c \sin \left (e+\frac {f x}{2}\right )\right )\right ) \sin (e)}{\sqrt {c^2-d^2} f \sqrt {\cos (2 e)-i \sin (2 e)}}\right )}{(-c+d)^3 (c+d)^2 (a+a \sec (e+f x)) (c+d \sec (e+f x))^3}+\frac {\cos \left (\frac {e}{2}+\frac {f x}{2}\right ) (d+c \cos (e+f x)) \sec \left (\frac {e}{2}\right ) \sec (e) \sec ^4(e+f x) \left (8 c^5 d \sin \left (\frac {f x}{2}\right )+10 c^4 d^2 \sin \left (\frac {f x}{2}\right )-11 c^3 d^3 \sin \left (\frac {f x}{2}\right )-17 c^2 d^4 \sin \left (\frac {f x}{2}\right )-2 c d^5 \sin \left (\frac {f x}{2}\right )+2 d^6 \sin \left (\frac {f x}{2}\right )-8 c^5 d \sin \left (\frac {3 f x}{2}\right )-22 c^4 d^2 \sin \left (\frac {3 f x}{2}\right )-27 c^3 d^3 \sin \left (\frac {3 f x}{2}\right )-5 c^2 d^4 \sin \left (\frac {3 f x}{2}\right )+2 c d^5 \sin \left (\frac {3 f x}{2}\right )+4 c^6 \sin \left (e-\frac {f x}{2}\right )+8 c^5 d \sin \left (e-\frac {f x}{2}\right )+18 c^4 d^2 \sin \left (e-\frac {f x}{2}\right )+35 c^3 d^3 \sin \left (e-\frac {f x}{2}\right )+25 c^2 d^4 \sin \left (e-\frac {f x}{2}\right )+2 c d^5 \sin \left (e-\frac {f x}{2}\right )-2 d^6 \sin \left (e-\frac {f x}{2}\right )-4 c^6 \sin \left (e+\frac {f x}{2}\right )-8 c^5 d \sin \left (e+\frac {f x}{2}\right )-6 c^4 d^2 \sin \left (e+\frac {f x}{2}\right )-7 c^3 d^3 \sin \left (e+\frac {f x}{2}\right )+5 c^2 d^4 \sin \left (e+\frac {f x}{2}\right )+2 c d^5 \sin \left (e+\frac {f x}{2}\right )-2 d^6 \sin \left (e+\frac {f x}{2}\right )+8 c^5 d \sin \left (2 e+\frac {f x}{2}\right )+22 c^4 d^2 \sin \left (2 e+\frac {f x}{2}\right )+17 c^3 d^3 \sin \left (2 e+\frac {f x}{2}\right )+13 c^2 d^4 \sin \left (2 e+\frac {f x}{2}\right )+2 c d^5 \sin \left (2 e+\frac {f x}{2}\right )-2 d^6 \sin \left (2 e+\frac {f x}{2}\right )+2 c^6 \sin \left (e+\frac {3 f x}{2}\right )+4 c^5 d \sin \left (e+\frac {3 f x}{2}\right )-4 c^4 d^2 \sin \left (e+\frac {3 f x}{2}\right )-19 c^3 d^3 \sin \left (e+\frac {3 f x}{2}\right )-5 c^2 d^4 \sin \left (e+\frac {3 f x}{2}\right )+2 c d^5 \sin \left (e+\frac {3 f x}{2}\right )-8 c^5 d \sin \left (2 e+\frac {3 f x}{2}\right )-16 c^4 d^2 \sin \left (2 e+\frac {3 f x}{2}\right )-c^3 d^3 \sin \left (2 e+\frac {3 f x}{2}\right )+2 c^2 d^4 \sin \left (2 e+\frac {3 f x}{2}\right )-2 c d^5 \sin \left (2 e+\frac {3 f x}{2}\right )+2 c^6 \sin \left (3 e+\frac {3 f x}{2}\right )+4 c^5 d \sin \left (3 e+\frac {3 f x}{2}\right )+2 c^4 d^2 \sin \left (3 e+\frac {3 f x}{2}\right )+7 c^3 d^3 \sin \left (3 e+\frac {3 f x}{2}\right )+2 c^2 d^4 \sin \left (3 e+\frac {3 f x}{2}\right )-2 c d^5 \sin \left (3 e+\frac {3 f x}{2}\right )-2 c^6 \sin \left (e+\frac {5 f x}{2}\right )-4 c^5 d \sin \left (e+\frac {5 f x}{2}\right )-8 c^4 d^2 \sin \left (e+\frac {5 f x}{2}\right )-2 c^3 d^3 \sin \left (e+\frac {5 f x}{2}\right )+c^2 d^4 \sin \left (e+\frac {5 f x}{2}\right )-6 c^4 d^2 \sin \left (2 e+\frac {5 f x}{2}\right )-2 c^3 d^3 \sin \left (2 e+\frac {5 f x}{2}\right )+c^2 d^4 \sin \left (2 e+\frac {5 f x}{2}\right )-2 c^6 \sin \left (3 e+\frac {5 f x}{2}\right )-4 c^5 d \sin \left (3 e+\frac {5 f x}{2}\right )-2 c^4 d^2 \sin \left (3 e+\frac {5 f x}{2}\right )\right )}{8 c^2 (-c+d)^3 (c+d)^2 f (a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \]
[In]
[Out]
Time = 0.99 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.07
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}}+\frac {2 d \left (\frac {-\frac {3 d \left (2 c^{2}-c d -d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (c^{2}+2 c d +d^{2}\right )}+\frac {d \left (6 c +d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 c +2 d}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{2}}-\frac {3 \left (2 c^{2}+2 c d +d^{2}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c -d \right )^{3}}}{f a}\) | \(221\) |
default | \(\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}}+\frac {2 d \left (\frac {-\frac {3 d \left (2 c^{2}-c d -d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (c^{2}+2 c d +d^{2}\right )}+\frac {d \left (6 c +d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 c +2 d}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{2}}-\frac {3 \left (2 c^{2}+2 c d +d^{2}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c^{2}+2 c d +d^{2}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c -d \right )^{3}}}{f a}\) | \(221\) |
risch | \(\frac {i \left (2 d^{6} {\mathrm e}^{2 i \left (f x +e \right )}+c^{2} d^{4}-4 c^{5} d -2 c^{3} d^{3}-8 c^{4} d^{2}-2 c^{6}-2 c \,d^{5} {\mathrm e}^{2 i \left (f x +e \right )}-7 c^{3} d^{3} {\mathrm e}^{4 i \left (f x +e \right )}-2 c^{2} d^{4} {\mathrm e}^{4 i \left (f x +e \right )}+2 c \,d^{5} {\mathrm e}^{4 i \left (f x +e \right )}-8 c^{5} d \,{\mathrm e}^{3 i \left (f x +e \right )}+2 c \,d^{5} {\mathrm e}^{i \left (f x +e \right )}-22 c^{4} d^{2} {\mathrm e}^{3 i \left (f x +e \right )}-17 c^{3} d^{3} {\mathrm e}^{3 i \left (f x +e \right )}-8 c^{5} d \,{\mathrm e}^{i \left (f x +e \right )}-22 c^{4} d^{2} {\mathrm e}^{i \left (f x +e \right )}-27 c^{3} d^{3} {\mathrm e}^{i \left (f x +e \right )}-5 c^{2} d^{4} {\mathrm e}^{i \left (f x +e \right )}-13 c^{2} d^{4} {\mathrm e}^{3 i \left (f x +e \right )}-2 c \,d^{5} {\mathrm e}^{3 i \left (f x +e \right )}-8 c^{5} d \,{\mathrm e}^{2 i \left (f x +e \right )}-4 c^{5} d \,{\mathrm e}^{4 i \left (f x +e \right )}-2 c^{4} d^{2} {\mathrm e}^{4 i \left (f x +e \right )}-18 c^{4} d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-35 c^{3} d^{3} {\mathrm e}^{2 i \left (f x +e \right )}-25 c^{2} d^{4} {\mathrm e}^{2 i \left (f x +e \right )}+2 d^{6} {\mathrm e}^{3 i \left (f x +e \right )}-4 c^{6} {\mathrm e}^{2 i \left (f x +e \right )}-2 c^{6} {\mathrm e}^{4 i \left (f x +e \right )}\right )}{c^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )} c +2 d \,{\mathrm e}^{i \left (f x +e \right )}+c \right )^{2} a \left (-c +d \right )^{3} f \left (c +d \right )^{2}}+\frac {3 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) c^{2}}{\sqrt {c^{2}-d^{2}}\, \left (c +d \right )^{2} \left (c -d \right )^{3} f a}+\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) c}{\sqrt {c^{2}-d^{2}}\, \left (c +d \right )^{2} \left (c -d \right )^{3} f a}+\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right )}{2 \sqrt {c^{2}-d^{2}}\, \left (c +d \right )^{2} \left (c -d \right )^{3} f a}-\frac {3 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) c^{2}}{\sqrt {c^{2}-d^{2}}\, \left (c +d \right )^{2} \left (c -d \right )^{3} f a}-\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) c}{\sqrt {c^{2}-d^{2}}\, \left (c +d \right )^{2} \left (c -d \right )^{3} f a}-\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right )}{2 \sqrt {c^{2}-d^{2}}\, \left (c +d \right )^{2} \left (c -d \right )^{3} f a}\) | \(1007\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 637 vs. \(2 (194) = 388\).
Time = 0.36 (sec) , antiderivative size = 1331, normalized size of antiderivative = 6.43 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=\frac {\int \frac {\sec {\left (e + f x \right )}}{c^{3} \sec {\left (e + f x \right )} + c^{3} + 3 c^{2} d \sec ^{2}{\left (e + f x \right )} + 3 c^{2} d \sec {\left (e + f x \right )} + 3 c d^{2} \sec ^{3}{\left (e + f x \right )} + 3 c d^{2} \sec ^{2}{\left (e + f x \right )} + d^{3} \sec ^{4}{\left (e + f x \right )} + d^{3} \sec ^{3}{\left (e + f x \right )}}\, dx}{a} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.38 (sec) , antiderivative size = 362, normalized size of antiderivative = 1.75 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=-\frac {\frac {3 \, {\left (2 \, c^{2} d + 2 \, c d^{2} + d^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, c + 2 \, d\right ) + \arctan \left (-\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )}}{{\left (a c^{5} - a c^{4} d - 2 \, a c^{3} d^{2} + 2 \, a c^{2} d^{3} + a c d^{4} - a d^{5}\right )} \sqrt {-c^{2} + d^{2}}} - \frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a c^{3} - 3 \, a c^{2} d + 3 \, a c d^{2} - a d^{3}} + \frac {6 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 7 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a c^{5} - a c^{4} d - 2 \, a c^{3} d^{2} + 2 \, a c^{2} d^{3} + a c d^{4} - a d^{5}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}^{2}}}{f} \]
[In]
[Out]
Time = 14.58 (sec) , antiderivative size = 379, normalized size of antiderivative = 1.83 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c+d \sec (e+f x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{a\,f\,{\left (c-d\right )}^3}-\frac {\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (d^3+6\,c\,d^2\right )}{c+d}+\frac {3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (-2\,c^2\,d^2+c\,d^3+d^4\right )}{{\left (c+d\right )}^2}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (2\,a\,c^5-6\,a\,c^4\,d+4\,a\,c^3\,d^2+4\,a\,c^2\,d^3-6\,a\,c\,d^4+2\,a\,d^5\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (a\,c^5-5\,a\,c^4\,d+10\,a\,c^3\,d^2-10\,a\,c^2\,d^3+5\,a\,c\,d^4-a\,d^5\right )-a\,c^5+a\,d^5-2\,a\,c^2\,d^3+2\,a\,c^3\,d^2-a\,c\,d^4+a\,c^4\,d\right )}+\frac {d\,\mathrm {atan}\left (\frac {1{}\mathrm {i}\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c^4-4{}\mathrm {i}\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c^3\,d+6{}\mathrm {i}\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c^2\,d^2-4{}\mathrm {i}\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c\,d^3+1{}\mathrm {i}\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,d^4}{\sqrt {c+d}\,{\left (c-d\right )}^{7/2}}\right )\,\left (2\,c^2+2\,c\,d+d^2\right )\,3{}\mathrm {i}}{a\,f\,{\left (c+d\right )}^{5/2}\,{\left (c-d\right )}^{7/2}} \]
[In]
[Out]